package mjc.tds;
import java.io.Serializable;
import java.util.Iterator;

public class CleMethode implements Serializable{

	String nom;
	Signature signature;
	
	public CleMethode(String nom,Signature signature){
		this.nom = nom;
		this.signature=signature;
	}
	
	public boolean equals(Object autre){
		if(this == autre){
			return true;
		}
		if((autre == null) || (autre.getClass() != this.getClass())){
			return false;
		}
		if(this.nom.equals(((CleMethode)autre).getNom()) && this.signature.equals(((CleMethode)autre).signature)){
			return true;
		}
		else{
			return false;
		}

	}
	
	public int hashCode(){
		return this.nom.hashCode() + this.signature.hashCode();
	}
	
	public String getNom(){
		return this.nom;
	}
	public String setNom(String _nom){
		return this.nom = _nom;
	}
	
	public Signature getSignature(){
		return this.signature;
	}
	
	public String toString(){
		return this.nom + this.signature.toString();
	}
}
